package gummachine.remote;

import gummachine.state.State;

import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 * description:
 *  糖果机远程服务接口
 * @author Yuanml on 2020/10/29 16:48
 */
public interface GumballMachineRemote extends Remote {
    /***
     * description:
     * 获取糖果机中糖果数量
     * @return  返回糖果机中糖果数量
     * @throws RemoteException 远程调用异常
     * @author Yuanml
     * @date 2020/10/29 下午4:49
     **/
    int getCount() throws RemoteException;

    /***
     * description:
     * 获取糖果机位置
     * @return 返回糖果机位置信息
     * @throws RemoteException 远程调用异常
     * @author Yuanml
     * @date 2020/10/29 下午4:50
     **/
    String getLocation() throws RemoteException;

    /***
     * description:
     * 获取糖果机状态
     * @return 返回糖果机状态
     * @throws RemoteException 远程调用异常
     * @author Yuanml
     * @date 2020/10/29 下午4:51
     **/
    State getState() throws RemoteException;

    /***
     * description:
     * 打印糖果机状态信息
     * @return 返回糖果机状态
     * @throws RemoteException 远程调用异常
     * @author Yuanml
     * @date 2020/10/29 下午5:26
     **/
    String report() throws RemoteException;
}
